﻿@model PInitiatives.Models.RegisterModel


@{
    ViewBag.Title = "Register";
}

<h3>Rejestracja</h3>
<br/>
<div style="border-bottom: 1px solid #DDD;"></div>
<br/>
<p>
    Proszę wypełnić poniższy formularz w celu utworzenia konta. 
</p>
<p>
    Twoje hasło do logowania musi posiadać minimum @Membership.MinRequiredPasswordLength znaków.
</p>
<br/>
<div style="border-bottom: 1px solid #DDD;"></div>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true, "Formularz rejestracyjny został niepoprawnie wypełniony. Proszę poprawić podświetlone błędy i spróbować ponownie.")
    <div>
        <fieldset>


            @*<div class="editor-label">
                @Html.LabelFor(m => m.aspnet_Users.UserName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.aspnet_Users.UserName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.FirstName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.FirstName)

            </div>*@
            
            <div class="editor-label">
                @Html.LabelFor(m => m.UserName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.UserName)
                @Html.ValidationMessageFor(m => m.UserName)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.Email)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.Email)
                @Html.ValidationMessageFor(m => m.Email)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.Password)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.Password)
                @Html.ValidationMessageFor(m => m.Password)
            </div>

            <div class="editor-label">
                @Html.LabelFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-field">
                @Html.PasswordFor(m => m.ConfirmPassword)
                @Html.ValidationMessageFor(m => m.ConfirmPassword)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.FirstName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m=>m.FirstName)
                @Html.ValidationMessageFor(m => m.FirstName)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.SecondName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m=>m.SecondName)
            </div>
            <div class="editor-label">
                @Html.LabelFor(m => m.LastName)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(m => m.LastName)
                @Html.ValidationMessageFor(m => m.LastName)
            </div>

            <br/>
            <div style="border-bottom: 1px solid #DDD;"></div>
            <br/>
            <button type="submit" class="btn ini-green-btn" value="Register">
                        <i class="icon-edit icon-white"></i>Zarejestruj</button>
        </fieldset>
    </div>
}
